import tesserocr

from PIL import Image
image=Image.open('/Users/wangbo/Documents/图片/计算类验证码.png')
result=tesserocr.image_to_text(image)  # 图像转化为文本
print(result)  # 等同于 print(tesserocr.file_to_text('image.png'))